<template>
	<view class="help">
		<view class="line1">
			<u-text size="19" :bold="true" 
			:text="info.line1"></u-text>
		</view>
		<view class="line2">
			<u-text color="#999" size="16" :text="info.line2"></u-text>
		</view>
		
		<view class="action">
			<u-button shape="circle"
			 @click="onButtonClick" 
			 customStyle="borderColor:#777;width:100px; "
			 :text="info.button"></u-button>
		</view>
	</view>
</template>

<script>
	export default {
		name:"kb-go-pulish",
		props:{
			rent_type:{
				type: [String , Number],
				default:  2,
			}
		},
		data() {
			return {
			 
				chuzu: {
					line1:'考虑出租？预先了解行情',
					line2:'提供出租定价参考和售前咨询服务',
					button: '帮我出租',
					 
				},
				sell: {
					line1:'考虑卖房？让我们来帮您',
					line2:'提供小区定价参考和售前咨询服务',
					button: '帮我出售',
					 
				},
				 
			};
		},
		computed:{
			
			info(){
				 if( this.rent_type == 2)
					return this.chuzu
				 else
					return this.sell
			}
		},
		methods:{
			onButtonClick(e ){
				console.log(e )
				if( this.rent_type ==2)
					uni.navigateTo({
						url: "/pages/send/index"
					});
				else 
					uni.navigateTo({
						url:"/pages/send/sell"
					})
			}
		}
	}
</script>

<style lang="scss">
.help{
	display: flex;
	flex-direction: column;
	align-items: center;
	padding:30rpx 0px;
	.line1,.line2{
		line-height: 30px;
	}
	.action{
		margin-top: 10px;
	}
}
</style>